package net.tbao.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import net.tbao.common.utils.PageUtils;
import net.tbao.member.entity.MemberEntity;
import net.tbao.member.exception.PhoneExsitException;
import net.tbao.member.exception.UsernameExsitException;
import net.tbao.member.vo.MemberLoginVo;
import net.tbao.member.vo.MemberRegistVo;
import net.tbao.member.vo.PersonalVo;
import net.tbao.member.vo.SocialUserVo;

import java.util.Map;

/**
 * 会员
 *
 * @author ZhangWang
 * @email 2248656478@qq.com
 * @date 2021-01-25 19:42:37
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 用户注册
     * @param vo
     */
    void regist(MemberRegistVo vo);

    /**
     * 检查邮箱
     * @param phone
     * @return
     */
    void checkPhonelUnique(String phone)throws PhoneExsitException;

    /**
     * 检查用户名
     * @param username
     * @return
     */
    void checkUsernameUnique(String username)throws UsernameExsitException;


    MemberEntity login(MemberLoginVo vo);

    /**
     * 社交账号登录
     * @param vo
     * @return
     */
    MemberEntity login(SocialUserVo vo) throws Exception;

    MemberEntity queryByPersonal(PersonalVo vo);
}

